package it.zqdszb.common;

import android.app.Activity;
import android.text.TextUtils;
import android.widget.TextView;

/**
 * Created by GH on 2018-05-15.
 */

public class ProgramManager {

	private static ProgramManager   instance;
	public ProgramManager(Activity activity) {

	}
	public static ProgramManager getInstance(Activity activity) {
		if (instance == null) {
			synchronized (ProgramManager.class) {
				if (instance == null) {
					instance = new ProgramManager(activity);
				}
			}
		}
		return instance;
	}

	public interface ProgramCheck
	{
		void hiddenHotChannelCount();

		void displayHotChannelCount();
	}


	public void displayCurrentProgram(String channelID, TextView textView, ProgramCheck programCheck, String channel_name)
	{
		if (TextUtils.isEmpty(channelID))
		{
			throw new NullPointerException("displayCurrentProgram  channelID  is null");
		}
		if (textView == null)
		{
			throw new NullPointerException(" displayCurrentProgram  textview  is null ");
		}
		/*boolean isSet = getFromCache(textView, channelID, programCheck);
		if (isSet)
		{
			return;
		}*/
		/*JTextView jTextView = new JTextView(textView);
		cacheKeyForJtextview.put(jTextView.getId(), channelID);
		String date = TimeFormat.forMatDate();
		TaskInfo taskInfo = new TaskInfo(channelID, date, jTextView);
		LoadProgramTask loadProgramTask = new LoadProgramTask(taskInfo, programCheck, channel_name);
		taskExecutor.execute(loadProgramTask);*/
	}
}
